<%@ include file="/WEB-INF/jsp/includes/header.jsp"%>
<table width="592">
	<tr>
		<td class="title"><s:property value="title"/></td>
	</tr>
	<tr><td>&nbsp;</td></tr>	
	<s:form id="visitaForm" action="createVisita" method="post" validate="true">
		<tr>
			<td class="metge" colspan="2">
				<s:property value="metge.nom"/> <s:property value="metge.primerCognom"/>
				<s:property value="metge.segonCognom"/> - 
				<s:text name="especialitat_en"/><s:property value="metge.especialitat"/> -
				<s:text name="collegiat"/><s:property value="metge.numeroColegiat"/>
			</td>
		</tr>
		<tr><td>&nbsp;</td></tr>	
		<!-- Inici dades comuns dels usuaris -->
		<s:if test="pacient != null">
			<s:push value="pacient">
				<tr id="row_<s:property  value="id"/>">
					<s:hidden name="idPacient" value="%{idPacient}"/>
					<td><s:label key="nom"/></td>
				</tr>
				<tr>
					<td><s:label key="primerCognom"/></td>
				</tr>
				<tr>
					<td><s:label key="segonCognom"/></td>
				</tr>	
			</s:push>
		</s:if>		
		<!-- Fi dades comuns dels usuaris -->
		<tr><td>&nbsp;</td></tr>
		<!-- Inici dades de la visita -->
		<tr>
			<td class="subtable"><s:text name="visita.detall"/></td>
		</tr>
		<tr>
			<td><s:textfield key="tema" required="true"/></td>
		</tr>			
		<tr>
			<td><s:textarea key="anamnesi" required="true" cols="50" rows="3" /></td>
		</tr>
		<tr>
			<td><s:textfield key="dataHora" required="true"/></td>
		</tr>
		<tr>
			<td class="format" colspan="2"><s:text name="dataHoraFormatLlarg"/></td>
		</tr>
		<tr>
			<td><s:textarea key="diagnosi" cols="50" rows="3"/></td>
		</tr>
		<tr>
			<td><s:textarea key="tractament" cols="50" rows="3"/></td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr>
			<td class="format" colspan="2"><s:text name="campRequerit"/></td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr>	
			<td colspan="2">
		 		<s:submit method="createVisita" key="visita.create" theme="simple"/>
				<s:submit  method="cancel" key="visita.create.cancel" theme="simple"/>
		 	</td>
		</tr>
	</s:form>
</table>

<table class="actions" width="592">
	<tr><td>&nbsp;</td></tr>
	<tr><td><s:text name="actions"/></td></tr>	
	<tr>
		<td><a href='<s:url action="showMetge" includeParams="none"/>'><s:text name="metge.go"/></a></td>	
		<td><a href='<s:url action="showPacients" includeParams="none"/>'><s:text name="pacients.go"/></a></td>	
		<td><a href='<s:url action="showPacient" includeParams="none">
				<s:param name="id" value="%{pacient.id}"/>
			</s:url>'><s:text name="pacient.go"/></a>
		</td>
		<td><a href='<s:url action="showHistorial" includeParams="none">
				<s:param name="id" value="%{idPacient}"/>
			</s:url>'><s:text name="historial.go"/></a>
		</td>	
		<td><a href="<s:url action="logout" includeParams="none"/>"><s:text name="logout"/></a></td>
	</tr>
</table>

<%@ include file="/WEB-INF/jsp/includes/footer.jsp"%>
